package com.itheima.TestFiled;

import java.lang.reflect.Field;

public class TestFiled {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchFieldException {
        Class<?> calzz = Class.forName("com.itheima.TestFiled.Student");

        Field[] fields = calzz.getFields();
        for (Field field : fields) {
            System.out.println(field);
        }
        System.out.println("-------------------");
        Field[] declaredFields = calzz.getDeclaredFields();
        for (Field declaredField : declaredFields) {
            System.out.println(declaredField);
        }

       /* Field field = calzz.getField("count");
        System.out.println(field);*/


        System.out.println("-------------------------");
        Field declaredField = calzz.getDeclaredField("count");
        System.out.println(declaredField);


    }
}
